Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Application-Defined Functions / Progress Functions


MyProgressProc

Your progress function should support the following interface:

pascal OSErr MyProgressProc (Movie theMovie, short message, 
                              short whatOperation, 
                              Fixed percentDone, long refcon);
theMovie
Specifies the movie for this operation. The Movie Toolbox sets this parameter to identify the appropriate movie.
message
Indicates why the Movie Toolbox called your function. The following values are valid:
movieProgressOpen
Indicates the start of a long operation. This is always the first message sent to your function. Your function can use this message to trigger the display of your progress window.
movieProgressUpdatePercent
Passes completion information to your function. The Movie Toolbox repeatedly sends this message to your function. The percentDone parameter indicates the relative completion of the operation. You can use this value to update your progress window.
movieProgressClose
Indicates the end of a long operation. This is always the last message sent to your function. Your function can use this message as an indication to remove its progress window.
whatOperation
Indicates the long operation that is currently underway. The following values are valid:
progressOpFlatten
Your application has called the FlattenMovie or FlattenMovieData function (described on page 2-93 and page 2-94, respectively).
progressOpInsertTrackSegment
Your application has called the InsertTrackSegment function (described on page 2-246). The Movie Toolbox calls the progress function that is assigned to the movie that contains the destination track.
progressOpInsertMovieSegment
Your application has called the InsertMovieSegment function (described on page 2-241). The Movie Toolbox calls the progress function that is assigned to the destination movie.
progressOpPaste
Your application has called the PasteMovieSelection function (described on page 2-233). The Movie Toolbox calls the progress function that is assigned to the destination movie.
progressOpAddMovieSelection
Your application has called the AddMovieSelection function (described on page 2-234). The Movie Toolbox calls the progress function that is assigned to the destination movie. The Movie Toolbox calls the progress function that is assigned to the destination movie.
progressOpCopy
Your application has called the CopyMovieSelection function (described on page 2-232). The Movie Toolbox calls the progress function that is assigned to the destination movie.
progressOpCut
Your application has called the CutMovieSelection function (described on page 2-231). The Movie Toolbox calls the progress function that is assigned to the destination movie.
progressOpLoadMovieIntoRam
Your application has called the LoadMovieIntoRam function (described on page 2-125). The Movie Toolbox calls the progress function that is assigned to the destination movie.
progressOpLoadTrackIntoRam
Your application has called the LoadTrackIntoRam function (described on page 2-127). The Movie Toolbox calls the progress function that is assigned to the destination track.
progressOpLoadMediaIntoRam
Your application has called the LoadMediaIntoRam function (described on page 2-128). The Movie Toolbox calls the progress function that is assigned to the destination media.
progressOpImportMovie
Your application has called the ConvertFileToMovieFile function (described on page 2-81). The Movie Toolbox calls the progress function that is associated with the destination movie file.
This flag is also used, as appropriate, for the PasteHandleIntoMovie functions (described on page 2-236).
progressOpExportMovie
Your application has called the ConvertMovieFile function (described on page 2-82). The Movie Toolbox calls the progress function that is associated with the destination movie. This flag is also used, as appropriate, for the PutMovieIntoTypedHandle function (described on page 2-237).
percentDone
Contains a fixed-point value indicating how far the operation has progressed. Its value is always between 0.0 and 1.0. This parameter is valid only when the message field is set to movieProgressUpdatePercent.
refcon
Reference constant value for use by your progress function. Your application specifies the value of this reference constant when you assign the progress function to the movie.
DESCRIPTION
Your progress function should return an error value. The Movie Toolbox examines this value after each movieProgressUpdatePercent message and before continuing the current operation. Set this value to a nonzero value, such as userCanceledErr, to cancel the operation; set it to noErr to continue.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996